/*
 * $Id: Credentials.java 16 2014-08-22 10:12:14Z ratking $
 *
 * Copyleft (C) 2014 RatKing. All wrongs reserved.
 */
package cn.ratking.demo.jaws6.security.vo;

import java.io.Serializable;

import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
 * 登录凭证
 */
@Named
@RequestScoped
public class Credentials implements Serializable {

    /** 用户 */
    private String username;
    /** 口令 */
    private String password;
    /** 验证码 */
    private String captcha;
    /** 记住我 */
    private boolean rememberMe;

    /** 无参构造方法 */
    public Credentials() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public boolean isRememberMe() {
        return rememberMe;
    }

    public void setRememberMe(boolean rememberMe) {
        this.rememberMe = rememberMe;
    }

    /**
     * 返回测试字符串
     *
     * @return 测试字符串
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();

        sb.append("Credentials: username=").append(username);
        sb.append(", password=").append(password);
        sb.append(", captcha=").append(captcha);
        sb.append(", rememberMe=").append(rememberMe);
        sb.append("]");

        return sb.toString();
    }
}
